﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ch01
{
    public partial class FrmTimer_ : Form
    {
        public FrmTimer_()
        {
            InitializeComponent();
        }
        //定时器
        private void FrmTimer__Load(object sender, EventArgs e)
        {
            this.pictureBox1.Image = imageList1.Images[0];
        }
        int i = 1;
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.pictureBox1.Image = imageList1.Images[i];
            i++;
            if (this.imageList1.Images.Count<=i)
            {
                i = 0;
            }
        }
    }
}
